import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import get from '@dfeidao/atom-mobile/local/get';
import set from '@dfeidao/atom-mobile/local/set';
import show_sheet from '@dfeidao/atom-mobile/msgbox/action-sheet';
import render from '@dfeidao/atom-mobile/render/render';
export default async function a002(fd: IFeidaoAiMobile) {
	const classes = get(fd, 'classes') as [{ class_id: string, class_name: string }];
	const options = new Array();
	classes.forEach((i) => {
		options.push({ text: i.class_name });
	});
	const res = await show_sheet({
		options,
		title: '选择班级'
	});
	const class_s = classes[res] as { class_id: string, class_name: string };
	if (!class_s) {
		return;
	}
	render(fd, { classes: class_s.class_name });
	set(fd, 'classes1', class_s);
}
